package com.party.core.model.collect;

import com.party.core.model.BaseModel;

import java.util.Date;

/**
 * @Description: 系统平台访问收集
 * @Author: yangshoukun
 * @Date: 2018/6/20 16:40
 */
public class SystemPlatformCollect extends BaseModel {
    private static final long serialVersionUID = -8714775917068041010L;

    // pv量
    private Long pvNum;
    // uv量
    private Long uvNum;

    public Long getPvNum() {
        return pvNum;
    }

    public void setPvNum(Long pvNum) {
        this.pvNum = pvNum;
    }

    public Long getUvNum() {
        return uvNum;
    }

    public void setUvNum(Long uvNum) {
        this.uvNum = uvNum;
    }

    public SystemPlatformCollect() {}

    public SystemPlatformCollect(Date createDate, Long pvNum, Long uvNum) {
        this.pvNum = pvNum;
        this.uvNum = uvNum;
        super.setCreateDate(createDate);
    }

    @Override
    public String toString() {
        return "SystemPlatformCollect{" +
                "pvNum=" + pvNum +
                ", uvNum=" + uvNum +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SystemPlatformCollect)) return false;
        if (!super.equals(o)) return false;

        SystemPlatformCollect that = (SystemPlatformCollect) o;

        if (pvNum != null ? !pvNum.equals(that.pvNum) : that.pvNum != null) return false;
        return uvNum != null ? uvNum.equals(that.uvNum) : that.uvNum == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (pvNum != null ? pvNum.hashCode() : 0);
        result = 31 * result + (uvNum != null ? uvNum.hashCode() : 0);
        return result;
    }
}
